import request from '@/api/request'

// 获取集群概览信息
export function getClusterView() {
  return request({
    url: '/managec/cluster_overview',
    method: 'get',
  })
}

// 创建集群
export function createCluster(params) {
  return request({
    url: '/managec/cluster_setup',
    method: 'post',
    data: params,
  })
}

// 添加已有集群
export function addCluster(params) {
  return request({
    url: '/managec/cluster_add',
    method: 'post',
    data: params,
  })
}

// 移除集群
export function removeCluster(params) {
  return request({
    url: '/managec/cluster_remove',
    method: 'post',
    data: params,
  })
}

// 摧毁集群
export function destroyCluster(params) {
  return request({
    url: '/managec/cluster_destroy',
    method: 'post',
    data: params,
  })
}
